package com.gome.wechat.program.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * Created by liwei113 on 2017/11/1 0001.
 */
@Data
public class UserDto {
    private Long id;
    @ApiModelProperty(value = "头像地址")
    private String headImage;
    @ApiModelProperty(value = "名字")
    private String name;
    @ApiModelProperty(value = "微信编号")
    private String openId;
    @ApiModelProperty(value = "sex")
    private Integer sex;
    @ApiModelProperty(value = "age")
    private Integer age;
    @ApiModelProperty(value = "个人介绍")
    private String introduction;
    @ApiModelProperty(value = "爱好")
    private List<Long> hobbyIds;

    public UserDto() {
    }

    private UserDto(Long id, String headImage, String name, String openId, Integer sex, Integer age, String introduction) {
        this.id = id;
        this.headImage = headImage;
        this.name = name;
        this.openId = openId;
        this.sex = sex;
        this.age = age;
        this.introduction = introduction;
    }

    public static UserDto create(Long id, String headImage, String name, String openId, Integer sex, Integer age, String introduction){
        UserDto result = new UserDto(id,headImage,name,openId
        ,sex,age,introduction);
        return result;
    }
}
